1. Field of the Invention
The present invention relates to a magnetic sensor, for example, for detecting the speed of revolution of a gear-shaped magnetic rotor.
2. Description of the Related Art
FIG. 17 is a side view of a conventional magnetic sensor. FIG. 18 is a sectional side view of the magnetic sensor shown in FIG. 17. FIG. 19 is a bottom view illustrating the inner structure of the magnetic sensor shown in FIG. 18 wherein its case is removed so that the inner structure can be seen. The magnetic sensor includes: a main part 1 of the sensor, and a connector 2 connected to the main part 1 of the sensor.
The main part 1 of the sensor includes: a cylindrical case 3 made up of a synthetic resin; a main electric circuit 4 placed in the case 3; a rectangular-shaped permanent magnet 5 disposed at an end of the main electric circuit 4; and a detector unit 6 including a giant magnetoresistive element (hereinafter referred to as a GMR) serving as a magnetic field sensing element wherein the detector unit 6 is disposed in front of the permanent magnet 5.
The main electric circuit 4 includes: a base 8 made of a synthetic resin; a resistor 9 and a capacitor 10 disposed on the base 8; and interconnecting conductors 11 for making electrical connections among the resistor 9, the capacitor 10, and the detector unit 6.
In the above magnetic sensor, when a gear-shaped magnetic rotor 12 disposed near the magnetic sensor is rotated, the recessed portions 12a and the protruding portions 12b of the magnetic rotor 12 alternately approach and pass by the detector unit 6. This creates a corresponding change in the magnetic field of the permanent magnet 5 which is applied to the detector unit 6. The above change in the magnetic field is detected as a change in voltage by the GMR element in the detector unit 6. The change in voltage generated by the GMR element is converted to an electric signal in the form of a pulse via a differential amplifier and a comparator in the detector unit 6. The resultant electric signal in pulse form is output to the outside. The electric signal is transmitted to a computer unit (not shown) via a terminal of the connector 2 so as to detect the rotation angle of the magnetic rotor 12. A filter is formed with the resistor 9 and the capacitor 10, wherein the filter serves to prevent the detector unit 6 from being exposed to external noise such as an external surge.
In the conventional magnetic sensor described above, the resistor 9 and the capacitor 10 are firmly fixed to the base 8 by soldering. However, a long processing time is required to fix these elements. This causes a reduction in the production efficiency of the magnetic sensor, and thus causes an increase in production cost. Furthermore, the resistor 9 and the capacitor 10 occupy a rather large area of the base 8. This causes an increase in the total size of the magnetic sensor.
Thus, it is a general object of the present invention to solve the above problems. More specifically, it is an object of the present invention to provide a magnetic sensor which can be produced in a small size at low cost with high productivity.